package com.paranoidmonkey.ode.Joint;

import com.paranoidmonkey.ode.AndrODE;
import com.paranoidmonkey.ode.World;

public class Hinge2 extends Joint{
	public Hinge2(World world,JointGroup group){
		handle=AndrODE.dJointCreateHinge2 (world.getHandle(), group.groupID);
	}
	public void setAxis1(float x, float y, float z){
		AndrODE.dJointSetHinge2Axis1 (handle, x, y, z);
	}
	public void setAxis2(float x, float y, float z){
		AndrODE.dJointSetHinge2Axis2 (handle, x, y, z);
	}
	public void setParam(int parameter, float value){
		AndrODE.dJointSetHinge2Param (handle, parameter, value);
	}
	public void setTorques(float torque1, float torque2){
		AndrODE.dJointAddHinge2Torques(handle, torque1, torque2);
	}
	public void getAnchor(float[] result){
		AndrODE.dJointGetHinge2Anchor (handle, result);
	}
	public void getAnchor2(float[] result){
		AndrODE.dJointGetHinge2Anchor2 (handle, result);
	}
	public void getAxis1(float[] result){
		AndrODE.dJointGetHinge2Axis1 (handle, result);
	}
	public void getAxis2(float[] result){
		AndrODE.dJointGetHinge2Axis2 (handle, result);
	}
	public float getParam(int parameter){
		return AndrODE.dJointGetHinge2Param (handle, parameter);
	}
	public float getAngle1(){
		return AndrODE.dJointGetHinge2Angle1 (handle);
	}
	public float getAngle1Rate(){
		return AndrODE.dJointGetHinge2Angle1Rate (handle);
	}
	public float getAngle2Rate(){
		return AndrODE.dJointGetHinge2Angle2Rate (handle);
	}

}
